package com.sks.bean.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sks.bean.privilege.Employee;

/**
 * Revert entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "revert")
public class Revert implements java.io.Serializable {

	// Fields

	private Integer revertId;
	private Employee employee;
	private Comment comment;
	private String content;
	private Date revertTime;
	private String remark;

	// Constructors

	/** default constructor */
	public Revert() {
	}

	/** minimal constructor */
	public Revert(Comment comment, String content, Date revertTime) {
		this.comment = comment;
		this.content = content;
		this.revertTime = revertTime;
	}

	/** full constructor */
	public Revert(Employee employee, Comment comment, String content,
			Date revertTime) {
		this.employee = employee;
		this.comment = comment;
		this.content = content;
		this.revertTime = revertTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "revertId", unique = true, nullable = false)
	public Integer getRevertId() {
		return this.revertId;
	}

	public void setRevertId(Integer revertId) {
		this.revertId = revertId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "employee")
	public Employee getEmployee() {
		return this.employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "commentId", nullable = false)
	public Comment getComment() {
		return this.comment;
	}

	public void setComment(Comment comment) {
		this.comment = comment;
	}

	@Column(name = "content", nullable = false, length = 500)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "revertTime", nullable = false, length = 19)
	public Date getRevertTime() {
		return this.revertTime;
	}

	public void setRevertTime(Date revertTime) {
		this.revertTime = revertTime;
	}

	@Column(name = "remark", length = 200)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}